Method of filtering pixels in a video encoding process

ABSTRACT

A method and apparatus, particularly suited to SIMD instruction sets, to filter streaming video information encoded under a predictive encoding algorithm specified under video encoding standards, such as MPEG 4 or H.264/AVC. The filtering operation de-blocks or removes unwanted borders in the perceived video. During the filtering process, a series of filtering mask is generated based on temporal and spatial statistics of predictive encoded video information, which is then recursively applied to the video in order to gate filtered or unfiltered video to an output channel according to coefficients of the masks. The filtering mask effectively yields a decision or rule-based map that transforms the video on a pixel-by-pixel basis thereby avoiding complex and processor-intensive decision tree logic customarily required to process individual pixels of successive macroblocks that may have different filtering requirements.

FIELD OF THE INVENTION

The present invention relates to real-time video processing, but morespecifically, to a method and system to filter digital video informationduring compression or decoding.

BACKGROUND OF THE INVENTION

Video compression is useful for reducing the bandwidth required totransmit video or to minimize storage requirements of video data in arecording medium. Some applications include motion picture transmissionand playback, video storage, videoconferencing, television broadcasting,video streaming over the Internet, and video communications generally.Lossless compression, although providing superior reproduction quality,has not proved to be viable in these applications. Lossy compressionalgorithms, on the other hand, which are specified by most videocompression standards produce objectionable visual artifacts, such as“blocking” or checker board image in the perceived video. Thisphenomenon is more pronounced at low bandwidths or during low bit-ratetransmission. In the context of predictive video coding specified underMPEG-1/2/4 and H.263/+/4 compression standards, for example, predictionchains typically span a large number of video frames. Since thesestandards employ macroblock processing of video information in 16×16pixel arrays, progressive degradation of video quality ensues ascumulative error introduced by artifacts increases with the length ofthe prediction chain.

To reduce unwanted visual artifacts, filtering or dc-blocking routinesmay be applied at any stage during compression or decompression (e.g.,encoding or decoding). Pre-filtering, occurs before compressing thevideo information. Dynamic pre-filters may be used in coordination withvideo encoding by modulating the degree of filtering in response to oneor more control signals or certain statistical characteristics of thevideo information generated during the encoding stage. Post-filtering,on the other hand, occurs after decompressing (or decoding) the videoinformation but before storing, transmitting, or displaying theinformation on a monitor. In addition, the degree of post-filtering maybe modulated by one or more control signals responsive to the degree ofperceived artifacts in the decompressed video information. It is knownin the art, however, that pre-filtering rather than post-filtering moresatisfactorily reduces unwanted visual artifacts. Routines that filterblocked-processed video information in a prediction chain requireintense, high-speed processing since handling or transformation of theindividual pixel elements within a macroblock may widely differ. Theproblem is exacerbated in SIMD (single instruction multiple data)architectures where multiple pixel elements are processed in a singleinstruction.

Loop filtering, which is defined under the H.2631+ standard and alsoadopted in the recently ratified JVT-AVC H.264 standard, providesanother filtering technique. These standards specify filtering videoinformation within a prediction loop, and differ from pre-filtering inthat video information is compressed before being filtered. During loopfiltering, however, any prediction derived from previously compressedvideo information and used in subsequent compression steps is alsofiltered. Loop filtering implemented at the decoder is believed toproduce the best reduction in compression artifacts. However, a standardthat specifies loop filtering forces every compliant video decoder (inaddition to the encoder) to perform filtering since such filteringcannot be excluded or separated from the video compression process.

Loop filtering defined under the JVT-AVC (Joint Video Team-AdvancedVideo CODEC) standard is particularly complex in that each pixel orpicture element (luminance and/or chrominance value) in a video framemay potentially be filtered at a different level and the process thatdetermines the level of filtering may be quite complex. The JVT-AVCstandard specifies filtering of macroblocks comprising a matrix of 16×16picture elements. It has been estimated that activities of loopfiltering for an optimized JVT-AVC codec may consume up to 50% of thecodec's processing cycles, depending on the profile and level of thestandard being employed. Thus, in a video decoder implementing a SIMDinstruction set, it is advantageous to provide a loop filter thatperforms real-time filtering robustly in order to avoid processing ortransmission delays in the video stream.

As known, SIMD instructions enable logical operations on multiplepicture elements contained in a macroblock, but (to not necessarilyprovide instructions for branching or looping. Although some SIMDarchitectures provide limited branching capability, the performancepenalty introduced by branching, in terms of processing delays andbreaking the flow of instructions during pipeline processing, requiressuch instructions to be used only in exceptional cases.

SUMMARY OF THE INVENTION

A first aspect of the invention comprises a method of filtering videoinformation encoded under a predictive encoding standard and processedutilizing SIMD instructions to transform individual pixels according tothreshold values derived during predictive encoding. The method includesthe steps obtaining statistical parameters from said video information,generating a filtering or transform mask based on the statisticalparameters, and employing the filtering mask in conjunction with theSIMD instructions to transform individual pixels of the videoinformation to produce a desired video output.

An additional aspect of the invention comprises a method of filteringpredictive encoded streaming video information in order to filterindividual elements of pixel groups. The method includes the steps ofobtaining statistical parameters from video information encoded under apredictive encoding algorithm, generating a set of filtering masks basedon the statistical parameters, and utilizing the filtering mask tofilter individual elements of the pixel groups by gating one of filteredand unfiltered pixel group over a video channel.

Another aspect of the invention comprises an apparatus that filtersvideo information utilizing predictive encoding and that utilizes a setof program instructions to process individual pixels according tothreshold values derived during predictive encoding. The apparatusincludes a processor that obtains statistical parameters from theencoded video information, a first routine to generate a filtering maskbased on the statistical parameters, and a second routine that employsthe filtering mask in conjunction With the program instructions totransform individual pixels of the video information to produce adesired video output.

A further aspect of the invention comprises an article of manufacturethat includes computer program code to effect filtering of videoinformation wherein the computer readable code is operative to obtainstatistical parameters from encoded video information, to derivethreshold values during predictive encoding of the video information, togenerate a filtering mask based on the statistical parameters, and toemploy the filtering mask and threshold values to transform individualpixels of the video information to produce a desired video output.

Other aspects of the invention will become apparent upon review of thefollowing description taken in conjunction with the accompanyingdrawings. The invention, though, is pointed out by the appended claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows a conventional scheme to filter a row (or column) of pixelsunder the JVT-AVC standard.

FIG. 2 illustrates a method of producing a filter mask and generating afiltering threshold value useful to modify and/or modulate the filteroutput according to an aspect of the present invention.

FIG. 3 illustrates a method of filtering pixel vectors of videoinformation using the filter mask and threshold value described in FIG.2.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The present invention provides a method and an apparatus to efficientlyfilter video data processed by SIMD instructions in which differentlevels of filtering may be applied on a pixel-by-pixel basis without theusually attendant branching routines or processing delays of priorfiltering techniques. The illustrated embodiment is applied to a JVT-AVCcodec, but the inventive concept may equally apply to other videoencoding/decoding methods and devices.

In a first embodiment, filtering is performed on pixels of a data set ina SIMD group and then the filtered output is selectively gated dependingon the level of filtering required at individual pixels. A “filteringmask,” for example, may be used for this purpose. Such a “filteringmask” separately defines rules to transform or “map” the data set to thedesired output on a pixel-by-pixel basis. The “filtering mask” not onlyenables or disables the filtering operation as seen by individual pixelsbeing filtered in the SIMD group, but also may control and/or modulatethe extent of filtering applied to the pixels. Thus, an aspect of thepresent invention concerns a dual-use filtering mask and a methodthereof particularly suited to SIMD architectures.

A particular embodiment applicable to the JVT-AVC standard illustrates adecision map that effectively yields a “filtering mask” to serve thedual purpose, e.g., on-off switching of the filtering operation at thepixel level and also to adjust the level or extent of filtering at thepixel level. Efficient organization of the decision tree advantageouslyenables a reduction in the number of instructions required to performfiltering using SIMD instructions. Furthermore, the nature of theillustrated algorithms, as applied to the JVT-AVC standard, particularlylends itself to SIMD instructions that employ multiple processingelements.

Although the illustrated embodiment sets forth a method to implementfiltering under the JVT-AVC standard, the general techniques oforganizing a decision tree or transform that maps threshold parametersto the appropriate filter coefficient thereby to yield a “filteringmask,” and the dual use of the resulting filtering or prediction maskare applicable to other standards of filtering video and/or to anapparatus that carries out such algorithms. The illustrated embodimentsets forth an application of the invention to horizontal filteringuseful under the JVT-AVC standard and includes an article of manufactureembodying program code to effect such filtering in accordance with themethods disclosed herein.

The JVT-AVC standard specifies two types of filters: a default filterand a strong filter. Default filtering is illustrated herein. Defaulthorizontal filtering defined under the JVT-AVC standard takes place on agroup of six pixels in a row, designated as q₂, q₁, q₀, p₂, p₁ and p₀.FIG. 1 illustrates filtering a group of six pixels by applyingthresholds. Under the JVT-AVC standard, sixteen sets of six-pixel groupsmay be filtered together in one round of filtering provided the SIMDinstruction set supports such long instructions. Many such sets may beprocessed in a single group. A typical SIMD architecture supportssimultaneous processing of four such sets.

FIG. 1 shows a logical flow process 10 to filter a row (or column) ofpixel elements q₂, q₁, q₀, p₂, p₁ and p₀. During processing, these pixelelements are respectively extracted from vectors Q₂, Q₁, Q_(O), P₂, P₁and P₀. A vector may comprise any number of pixel elements depending onthe number supported by the SIMD or similar type of instruction set. Theprocess 10 is applied recursively to each pixel contained in thevectors. Loop filtering specified under the JVT-AVC standard applies avariable level of digital filtering at each pixel. Filtering iscontrolled by three threshold parameters a, b, and c₀ specified underthe standard. Thresholds a and b, for example, determine whether toapply filtering at a particular pixel and threshold c₀ controls or setsthe maximum deviation of the filtered output from an unfiltered value.

In the illustrated process 10, step 12 examines whether the absolutevalue of the difference between picture elements q₁, and p₁ exceedsthreshold a. If not, the routine branches to done step 36. Ifaffirmative, a next comparison is made at step 14 relative to whetherthe absolute value of the difference between picture elements p₁ and p₂exceeds threshold b. The process is repeated at step 16 relative topicture elements q₁ and q₂. Step 18 examines whether the absolute valueof the difference between p₁ and p₃, a pixel elements in neighboringgroup, exceeds threshold b. If affirmative, threshold c₀ is indexed bythe integer “1” (step 20) before proceeding to step 22, which repeatsthe comparison and examination relative to picture elements q₁, and q₃.Pixel element q₃ is also an element contained in another group. If, atstep 18, the absolute value of the difference between p₁ and p₃ is lessthan threshold b, step 20 is bypassed. At step 22, q₁ and q₂ aresimilarly tested. If threshold b is not exceeded, threshold c₀ isindexed at step 26 before filter filtering p₀ and q₀ at step 24.Otherwise, p₀ and q₀ are filtered at step 24. At step 28, p₁ and p₃ areexamined relative to threshold b. At step 30, p₁ is filtered if thethreshold is not exceeded. If threshold b is exceeded at step 28, q₁ andq₃ are examined at step 32 to determine whether their difference exceedsthreshold b. If the difference is less than threshold b, q₁ is filteredat step 34. Otherwise, the process is done, at step 36.

The values of thresholds a, b, and c₀ are derived from various encoderparameters, such as a quantization scale, extent of motion, number ofnon-zero quantized coefficients, and/or other spatial, temporal, orstatic parameters related to the video information. Also, a recursiveprocess implemented during filtering enforces a particular order inwhich the pixels within the video stream are filtered in order toconform filtering to the standard. Filtering may take place along rowsof pixels (horizontal filtering) or along columns of pixels (verticalfiltering).

In the illustrated embodiment, Q₂, Q₁, Q₀, P₂, P₁ and P₀ respectivelydenote vector versions of q₂, q₁, q₀, p₂, p₁ and p₀. For example, in afour-way SIMD architecture, Q₂ may represent a group of four adjacentpixels in a column. Similarly, A, B and C₀ are the vector versions of a,b and c₀ respectively.

FIG. 2 illustrates a process 40 to generate a series of masks ortransform maps used to selectively gate and/or modulate the extent offiltering applied to the picture elements. When used in a SIMDenvironment, each mask 42, 44, 46, and 48 is generated using logicaloperations supported by SIMD instructions. Mask M (42) controlsfiltering of pixel vectors Q₀ and P₀, i.e., the corresponding SIMDelements in mask M (42) would be −1 in two's complement notation if thecorresponding filtered elements in Q₀ and P₀ are zero. Similarly, maskM_(p) (44) and mask M_(q) (46) respectively control filtering of pixelvectors P₁ and Q₁. By taking advantage of the two's complement notationof masks M_(p) (44) and M_(q) (46), the operation at step 48conveniently modulates input threshold or maximum deviation vector C₀ toobtain a modified vector C₀′, as required by the standard through asimple process of subtracting masks M_(p) and M_(q) from vector C₀.Thus, the invention advantageously achieves a dual use of the masks tocontrol both pixel vector filtering and threshold modulation.

Depending on the SIMD instructions available, generation of the masks ona particular architecture may be slightly different. The following codesnippet shows derivation of mask M (42) in the embodiment illustrated inFIG. 2,

M=(/P ₁ −Q ₁ /<A)AND(/P ₁ −P ₂ /<B)AND(/Q ₁ −Q ₂ <B  (1)

where |x| denotes an element-wise absolute value operation on “x” and“AND” denotes a logical, element-wise “and” operation.

Similarly, mask Mp (44) and Mq (46) of FIG. 2 are given by:

M _(p)=(/P ₁ −P ₃ /<B)AND(M)  (2)

M _(q)=(/Q ₁ −Q ₃ /<B)AND(M)  (3)

FIG. 3 shows an application of masks 42, 44 and 46 and the maximumallowed deviation vector C₀′ to pixel vectors Q₂, Q₁, Q₀, P₂, P₁ and P₀.As shown, filters 52, 54, and 56 respectively filter the individualpixel elements of vectors Q₂, Q₁, Q₀, P₂, P₁ and P₀ irrespective ofwhether filtering or non-filtering is denoted for a correspondingelement in the mask. The individual pixel elements of the vectors areapplied in groups to filters 52, 54, and 56, which carry out thefiltering operations substantially shown in FIG. 1. The filteringprocesses implemented by filters 52, 54, and 56, however, use themodified threshold value c_(o)′ of vector C_(o)′ instead of thresholdvalue c_(o) at corresponding steps 20 and 26 of FIG. 1.

The filtered outputs of filters 52, 54, and 56 and the masks M, M_(p),and M_(q) are respectively applied to combiners 62, 64, and 66, whicheffectively “gate,” i.e., switch between, the filtered outputs offilters 52, 54, and 56 or unfiltered vectors Q₂, Q₁, Q₀, P₂, P₁ and P₀.The combiners pass either the filtered or unfiltered video to the videochannel 70. For example, if F represents a filtered value, U representsan unfiltered value, and M is a mask that is used to filter U to produceF, each of the combinatorial blocks 62, 64, and 66 outputs (U ANDCOMPLEMENT(M))+(F AND M), where COMPLEMENT(M) denotes an element-wiseone's complement of “M.” By virtue of the masking operation, theindividual pixel elements as a group are modulated and/or filtered in asingle instruction thereby eliminating branching operations that mayotherwise be required to determine the transformation of each individualpixel.

In some implementations, there may be slight variations in the maskingprocess. For example, when the JVT-AVC standard specifies thecomputation of a difference (D) between the filtered and unfilteredvalues, the combinatorial block outputs U+(D AND M).

As described above, the illustrated embodiment is shown to conform tothe JVT-AVC standard but may be modified to apply to otherencoding/decoding algorithms based on the teachings herein. The numberof pixel elements processed in a group may also vary, as well as thenumber and character of the transform or “filtering maps.” The inventionalso may be implemented with any type of “single instruction multipledata” (SIMD) instruction set or in an environment utilizing routineprogram instructions. Some or all of the pixel elements of a videostream may be filtered without departing from the scope of theinvention. Thus, the invention may form part of a hybrid filter whenused in conjunction with other filtering techniques. Further, spatial,temporal or other parameters of the encoded video from which to derivethreshold values and/or to modulate or adjust level may also vary fromthose disclosed herein.

1. In a method of filtering video information encoded by under apredictive encoding standard and processed utilizing SIMD instructionsto transform individual pixels according to threshold values derivedduring said predictive encoding, said method comprising: obtainingstatistical parameters from said video information, generating afiltering mask based on said statistical parameters, and employing saidfiltering mask in conjunction with SIMD instructions to transformindividual pixels of said video information to produce a desired videooutput.
 2. The method of claim 1, wherein said video encoding standardis specified by H.264/AVC.
 3. The method of claim 2, wherein saidstatistical parameters comprise at least one of a quantization scale,extent of motion, and number of non-zero quantized coefficients derivedduring encoding.
 4. The method of claim 3, further comprising:selectively applying the filtering mask to filtered values producedduring filtering to influence the level of filtering of individualpixels.
 5. The method of claim 4, further comprising: modifying thefiltering mask before selectively applying the filtering mask tofiltered values produced during filtering to influence the level offiltering of individual pixels.
 6. The method of claim 4, furthercomprising: modifying the filtering mask before selectively applying thefiltering mask to threshold values produced during filtering toinfluence the level of filtering of individual pixels.
 7. The method ofclaim 1, wherein said filtering mask comprises a transform map thatdefines decision logic to transform individual pixels of a pixel group.8. A method of filtering predictive encoded streaming video informationin order to filter individual elements of pixel groups, said methodcomprising: obtaining statistical parameters from video informationencoded under said predictive encoding algorithm, generating a set offiltering masks based on said statistical parameters, and utilizing saidfiltering mask to filter individual elements of said pixel groups bygating one of filtered and unfiltered pixel group over a video channel.9. The method of claim 8, further including utilizing a predictiveencoding algorithm defined under H.264/AVC.
 10. The method of claim 9,further including utilizing single-instruction-multiple-datainstructions in said generating and utilizing steps. 11-26. (canceled)